package com.ts.webapplication.Config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author tiansong
 * @create 2019/6/1/001 - {TIME}
 */
@Configuration
public class MainConfig {

    @Bean
    public WebMvcConfigurer webMvcConfigurer(){
        return new WebMvcConfigurer() {
            @Override
            public void addViewControllers(ViewControllerRegistry registry) {
                registry.addViewController("/login").setViewName("login");
                registry.addViewController("/update").setViewName("update");
                registry.addViewController("/addUser").setViewName("add");
                registry.addViewController("/list.html").setViewName("list");

            }
        };
    }


}
